package top.rainbowecho.common.domain.shared.vo;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import org.springframework.http.HttpStatus;
import top.rainbowecho.common.domain.shared.ValueObject;

import java.util.Map;

/**
 * 返回给前台的响应结果
 *
 * @author 杨健
 * @date 2019/6/10 16:26
 */
@Getter
@NoArgsConstructor
@AllArgsConstructor
public class ResponseResult implements ValueObject<ResponseResult> {
    private boolean success;

    private HttpStatus status;

    Map<String, Object> data;

    /**
     * 值对象的比较方法
     *
     * @param other 比较对象
     * @return true表示值对象相等，反之不等
     */
    @Override
    public boolean sameValueAs(ResponseResult other) {
        return false;
    }
}
